From 565668376998b16ef9b5442e3d41cc91a22cf78f Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 5 Nov 2016 10:36:52 +0100 Subject: [PATCH] Let findHooks.php find UserCreateForm/UserLoginForm To make findHooks.php happy the hooks must be explicit called with Hooks::run, passing the name with a variable makes it impossible to detect and therefore the script unhappy. In case of B/C this is should be a possible solution. Change-Id: Iaf4d325a3821e09a742d23a3a5bca8493965bfb8 --- includes/specialpage/LoginSignupSpecialPage.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/includes/specialpage/LoginSignupSpecialPage.php b/includes/specialpage/LoginSignupSpecialPage.php index 984e32bdb1..c4e1f178fb 100644 --- a/includes/specialpage/LoginSignupSpecialPage.php +++ b/includes/specialpage/LoginSignupSpecialPage.php @@ -763,10 +763,18 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage { $wgAuth->modifyUITemplate( $template, $action ); $oldTemplate = $template; - $hookName = $this->isSignup() ? 'UserCreateForm' : 'UserLoginForm'; - Hooks::run( $hookName, [ &$template ] ); - if ( $oldTemplate !== $template ) { - wfDeprecated( "reference in $hookName hook", '1.27' ); + + // Both Hooks::run are explicit here to make findHooks.php happy + if ( $this->isSignup() ) { + Hooks::run( 'UserCreateForm', [ &$template ] ); + if ( $oldTemplate !== $template ) { + wfDeprecated( "reference in UserCreateForm hook", '1.27' ); + } + } else { + Hooks::run( 'UserLoginForm', [ &$template ] ); + if ( $oldTemplate !== $template ) { + wfDeprecated( "reference in UserLoginForm hook", '1.27' ); + } } return $template; -- 2.20.1